﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"  MaintainScrollPositionOnPostback="true"
Inherits="Nivdal.MatchPage" Title=" " Theme="SkinFile" Codebehind="MatchPage.aspx.cs" %>

<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc2" %>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <h1><asp:Label ID="PageNameLabel" runat="server" CssClass="PageNameContentStyle"></asp:Label></h1>
</asp:Content>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <script type="text/javascript" language="javascript">
        function ShowNewMatchEvent(divId) {
            $("#" + divId).hide(1000);
            $("#" + divId).show(1000);
        }
    </script>
    
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element padding5">
    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
    <asp:HiddenField ID="MatchOrdersAssignmentStatus" runat="server" />
    <asp:HiddenField ID="IsNationalTeamHiddenField" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
            </Triggers>
            <ContentTemplate>
                <asp:Timer ID="Timer1" OnTick="Timer1_Tick" runat="server" Interval="60000">
                </asp:Timer>
                <asp:HiddenField ID="MatchIdHiddenField" runat="server" />
                <asp:Label ID="Message" runat="server" Text="" SkinID="ConfirmLabel"></asp:Label>
                <asp:ListView ID="ScoreBordListView" runat="server" DataSourceID="ScoreBordSqlDataSource">
                    <LayoutTemplate>
                     <asp:Label ID="itemPlaceholder" runat="server"></asp:Label>
                    </LayoutTemplate>
                    <ItemTemplate>
                <table style="width:100%;" border="0" cellpadding="0" cellspacing="0" class="rounded_corners">
                <tr style="background-color:Silver;"  class="rounded_corners">
                    <td colspan="4" align="center" style="padding:5px;"  class="rounded_corners">
                        <div style="float:left;"  class="rounded_corners">
                            <asp:ImageButton ID="BookmarkLinkButton" runat="server" OnClick="BookmarkLinkButton_Click" Visible='<%# IsPremium() %>' 
                            ImageUrl="~/Images/bookmarks.png" ToolTip="<%$ Resources:Resource, MatchPage_BookmarkLinkButtonToolTip %>"/> 
                            <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("TypeNum")) %>' 
                            ToolTip='<%#GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("TypeNum")) %>'/>
                            <asp:ImageButton ID="AddToLiveButton" runat="server" ImageUrl="~/Images/Icons/LiveDetails.png" 
                            ToolTip="<%$ Resources:Resource, Live_AddMatchToLiveText %>" OnClick="AddMatchToLive"
                            Visible='<%# IsAllowedLive(Eval("CanAddToLive")) %>'  />
                            <asp:HyperLink ID="AssignMatchOrdersHyperlink" runat="server" 
                             NavigateUrl='<%# MatchInstructionsPageAddress() %>'
                             ImageUrl='<%# MatchInstructionsPageImage() %>'
                             ToolTip='<%# MatchInstructionsPageToolTip() %>'
                             Visible='<%# MatchInstructionsLinkVisible() %>'></asp:HyperLink>
                            
                        </div>
                        <asp:Label ID="MatchInfoLabel" runat="server" Text='<%# Eval("MatchInfo") %>' SkinID="ScoreBoardLabel"/>
                        
                    </td>
                </tr>            
                <tr style="min-height:50px; background-color:#F4F3F3;"  class="rounded_corners">
                    <td style="width: 40%; padding:5px;" align="center" class="rounded_corners">
                        <asp:Hyperlink ID="HomeTeamLinkButton" runat="server" Text='<%# Eval("HomeTeamName") %>'
                           NavigateUrl='<%# (bool)Eval("IsNT") ? "NationalTeam.aspx?Id=" + Eval("HomeTeamId") : "TeamHomePage.aspx?TeamId=" + Eval("HomeTeamId")  %>' 
                           CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>
                        <br />
                        <asp:ImageButton ID="HomeTeamLogo" runat="server" ImageUrl='<%# Eval("HomeTeamLogo") %>' 
                        PostBackUrl='<%# (bool)Eval("IsNT") ? "NationalTeam.aspx?Id=" + Eval("HomeTeamId") : "TeamHomePage.aspx?TeamId=" + Eval("HomeTeamId") %>' 
                        onerror="this.src='Images/menupicture.gif';" ToolTip='<%# Eval("HomeTeamName") %>' Width="48" Height="48"/>
                                
                            </td>
                            <td style="width: 20%; padding:15px; background-image:url('Images/MatchIcons/resultbg.png');
                                background-repeat:no-repeat; background-position:center;" align="center" colspan="2">
                                <table style="width:100%;">
                                    <tr>
                                        <td style="width:50%; padding:5px; text-align:center;">
                                            <asp:Label ID="HomeTeamScoreLabel" runat="server" Text='<%# Eval("HomeTeamScore") %>' SkinID="MatchResultLabel" />
                                        </td>
                                        <td style="width:50%; text-align:center; padding:5px;">
                                            <asp:Label ID="AwayTeamScoreLabel" runat="server" Text='<%# Eval("AwayTeamScore") %>' SkinID="MatchResultLabel" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td style="width: 40%; padding:5px;" align="center">
                                <asp:Hyperlink ID="AwayTeamLinkButton" runat="server" Text='<%# Eval("AwayTeamName") %>'
                                   NavigateUrl='<%# (bool)Eval("IsNT") ? "NationalTeam.aspx?Id=" + Eval("AwayTeamId") : "TeamHomePage.aspx?TeamId=" + Eval("AwayTeamId")  %>' 
                                   CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>
                                <br />
                                <asp:ImageButton ID="AwayTeamLogo" runat="server" ImageUrl='<%# Eval("AwayTeamLogo") %>' 
                                PostBackUrl='<%# (bool)Eval("IsNT") ? "NationalTeam.aspx?Id=" + Eval("AwayTeamId") : "TeamHomePage.aspx?TeamId=" + Eval("AwayTeamId") %>' 
                                onerror="this.src='Images/menupicture.gif';" ToolTip='<%# Eval("AwayTeamName") %>' Width="48" Height="48"/>
                        </td>
                    </tr>
                    <tr style="background-color:Silver; vertical-align:middle;"  class="rounded_corners">
                            <td colspan="4" style="padding:3px;" class="rounded_corners">    
                                <asp:Image ID="WeatherIcon" runat="server" ToolTip='<%# Eval("WeatherInfo") %>' ImageUrl='<%# Eval("WeatherIcon") %>'/>
                                &nbsp;
                                <asp:HyperLink ID="StadiumHyperlink" runat="server" Text='<%# Eval("Stadium") %>' SkinID="BlackHyperLinkSkin"
                                             NavigateUrl='<%# "StadiumPage.aspx?StadiumId=" + Eval("StadiumId") %>' Visible='<%# Eval("StadiumAssigned") %>'> </asp:HyperLink>
                                            <asp:Label ID="StadiumLabel" runat="server" Text='<%# Eval("Stadium") %>' SkinID="GridLabel"
                                              Visible='<%# !((bool) Eval("StadiumAssigned")) %>'/>
                                &nbsp;
                                <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel" 
                                     Visible='<%# Eval("MatchStarted") %>'></asp:Label>                                      
                                <br />
                                <asp:Panel ID="SpectatorsPanel" runat="server" Visible='<%# Eval("MatchStarted") %>'> 
                                    
                                    <asp:Label ID="SpectatorsTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchPage_SpectatorsTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="SpectatorsLabel" runat="server" Text='<%# FormatNumber(Eval("SpectatorsTotal")) %>' SkinID="GridLabel"></asp:Label>
                                    &nbsp;
                                    <asp:Label ID="SpectatorsBasicTitleLabel" runat="server" Text='<%# Resources.Resource.Global_BasicSeats + ":"%>' SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="SpectatorsInfoBasic" runat="server" Text='<%#  FormatNumber(Eval("TicketsSoldBasic")) %>' SkinID="GridLabel"></asp:Label>
                                    &nbsp;
                                    <asp:Label ID="SpectatorsUnderRoofTitleLabel" runat="server" Text='<%# Resources.Resource.Global_UnderRoof+ ":"%>' SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="SpectatorsUnderRoofLabel" runat="server" Text='<%#  FormatNumber(Eval("TicketsSoldUnderRoof")) %>' SkinID="GridLabel"></asp:Label>
                                    &nbsp;
                                    <asp:Label ID="SpectatorsVipTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchPage_SpectatorsVipTitleLabel %>" SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="SpectatorsVipLabel" runat="server" Text='<%#  FormatNumber(Eval("TicketsSoldVip")) %>' SkinID="GridLabel"></asp:Label>
                                    <br />
                                    <asp:Label ID="HomeTeamIncomeTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchPage_HomeTeamIncomeText %>"
                                     SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="HomeTeamIncomeLabel" runat="server" Text='<%#  FormatNumber(Eval("HomeTeamIncome")) %>' SkinID="GridLabel"></asp:Label>
                                    <asp:Image ID="AtukImage1" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
                                    &nbsp;
                                    <asp:Label ID="AwayTeamIncomeTitleLabel" runat="server" Text="<%$ Resources:Resource, MatchPage_AwayTeamIncomeText %>" SkinID="InfoLabel"></asp:Label>
                                    <asp:Label ID="AwatTeamIncomeLabel" runat="server" Text='<%#  FormatNumber(Eval("AwayTeamIncome")) %>' SkinID="GridLabel"></asp:Label>
                                    <asp:Image ID="AtukImage2" runat="server" ImageUrl="~/Images/Icons/atuk.png" ToolTip="<%$ Resources:Resource, Atuks %>" />
                                                                      
                               </asp:Panel>                                  
                                                   
                            </td>
                        </tr>
                        
                        <tr style="background-color:#F4F3F3;">
                            <td colspan="2" style="padding:5px; vertical-align:top;">
                                <asp:GridView ID="HomeTeamGoalsAndWarningsForScoreboardGridView" runat="server" AutoGenerateColumns="False"
                                    ShowHeader="False" DataSourceID="HomeTeamGoalsAndWarningsForScoreboardSqlDataSource" Visible='<%# Eval("MatchStarted") %>'
                                    BorderWidth="0" CellPadding="5" CellSpacing="2">
                                    <Columns>
                                        <asp:TemplateField ItemStyle-VerticalAlign="Top">
                                            <ItemTemplate>
                                                <asp:Image ID="EvengtImage" runat="server" ToolTip='<%# Eval("EventType")%>'
                                                 ImageUrl='<%# Eval("EventIcon", "~/Images/MatchIcons/{0}") %>'/>
                                            </ItemTemplate>
                                            
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:Label ID="MinuteLabel" runat="server" Text='<%# Eval("Minute") + " min"%>' SkinID="InfoLabel"> </asp:Label>
                                                <asp:Label ID="EventLabel" runat="server" Text='<%# Eval("EventText") %>'
                                                 SkinID="InfoLabel"  Visible='<%# !(bool)Eval("IsSubstitution") %>'></asp:Label>
                                                
                                                <asp:Panel ID="SubstitutionPanel" runat="server" Visible='<%# Eval("IsSubstitution") %>'>
                                                    <asp:Panel ID="PlayerSubPanel" runat="server" Visible='<%# Eval("PlayerOut").ToString() != "0" %>' >
                                                        <asp:Image ID="PlayerOutImage" runat="server" ImageUrl="~/Images/Icons/PlayerOut.png"
                                                         ToolTip="<%$  Resources:Resource, Global_PlayerOut %>" Visible='<%# Eval("PlayerIn").ToString() != "0" %>' />
                                                        <%--<asp:Label ID="PlayerOutLabel" runat="server" Text="<%$ Resources:Resource, Global_PlayerOut %>"
                                                         SkinID="InfoLabel" Visible='<%# Eval("PlayerIn").ToString() != "0" %>'></asp:Label>--%>
                                                        <asp:HyperLink ID="PlayerOutHyperlink" runat="server" SkinID="GreenInfoHyperLink"
                                                         Text='<%# Eval("PlayerOutName") %>' NavigateUrl='<%# "~/Player.aspx?Id=" + Eval("PlayerOut") %>'></asp:HyperLink>  
                                                         <asp:Panel ID="PlayerInPanel" runat="server" Visible='<%# Eval("PlayerIn").ToString() != "0" %>'  >
                                                            <asp:Image ID="PlayerInImage" runat="server" ImageUrl="~/Images/Icons/PlayerIn.png"
                                                             ToolTip="<%$  Resources:Resource, Global_PlayerIn %>" />
                                                             <%--<asp:Label ID="PlayerInTitleLabel" runat="server"  SkinID="InfoLabel"
                                                             Text="<%$  Resources:Resource, Global_PlayerIn %>"></asp:Label>--%>
                                                            <asp:HyperLink ID="PlayerIlinkn" runat="server" SkinID="GreenInfoHyperLink"
                                                             Text='<%# Eval("PlayerInName") %>' NavigateUrl='<%# "~/Player.aspx?Id=" + Eval("PlayerIn") %>'></asp:HyperLink> 
                                                         </asp:Panel>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerPositionPanel" runat="server" Visible='<%# Eval("newPosition").ToString().Length > 0 %>'>
                                                         <asp:Label ID="NewPlayerPositionLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Position + ": " + Eval("newPosition") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerInstructionPanel" runat="server" Visible='<%# Eval("newInstruction").ToString().Length > 0 %>'>
                                                        <asp:Label ID="NewInstructionLabel" runat="server" SkinID="InfoLabel"
                                                        Text='<%# Resources.Resource.Global_Instruction + ": " + Eval("newInstruction") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerPreferredActionPanel" runat="server" Visible='<%# Eval("newPreferredAction").ToString().Length > 0 %>'>
                                                        <asp:Label ID="NewPreferredActionLabel" runat="server"  SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.MatchInstructions_PreferredActionLabel + ": " + Eval("newPreferredAction") %>'></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="newAttitudePanel" runat="server" Visible='<%# Eval("newAttitude").ToString().Length > 0 %>'>
                                                        <asp:Label ID="newAttitudeLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Attitude + ": " + Eval("newAttitude") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="newAggressivenessPanel" runat="server" Visible='<%# Eval("newAggressiveness").ToString().Length > 0 %>'>
                                                        <asp:Label ID="newAggressivenessLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Aggressiveness + ": " + Eval("newAggressiveness") %>' ></asp:Label>
                                                     </asp:Panel>
                                                </asp:Panel>
                                                <%--<asp:HyperLink ID="PlayerNameHyperLink" runat="server" Text='<%# Eval("PlayerName") %>'
                                                    NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:HyperLink>--%>
                                            </ItemTemplate>
                                            <ItemStyle BorderWidth="0" />
                                        </asp:TemplateField>
                                        
                                    </Columns>
                                </asp:GridView>
                            </td>
                            <td colspan="2" style="vertical-align:top;">
                                <asp:GridView ID="AwayTeamGoalsAndWarningsForScoreboardGridView" runat="server" AutoGenerateColumns="False"
                                    ShowHeader="False" DataSourceID="AwayTeamGoalsAndWarningsForScoreboardSqlDataSource" BorderWidth="0" 
                                    Visible='<%# Eval("MatchStarted") %>' CellPadding="5" CellSpacing="2">
                                    <Columns>
                                        <asp:TemplateField ItemStyle-VerticalAlign="Top">
                                            <ItemTemplate>
                                                <asp:Image ID="EvengtImage" runat="server" ToolTip='<%# Eval("EventType ")%>'
                                                 ImageUrl='<%# Eval("EventIcon", "~/Images/MatchIcons/{0}") %>'/>
                                            </ItemTemplate>
                                            <ItemStyle BorderWidth="0" />
                                        </asp:TemplateField>
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:Label ID="MinuteLabel" runat="server" Text='<%# Eval("Minute") + " min"%>' SkinID="InfoLabel"> </asp:Label>
                                                <asp:Label ID="EventLabel" runat="server" Text='<%# Eval("EventText") %>' 
                                                Visible='<%# !(bool)Eval("IsSubstitution") %>'  SkinID="InfoLabel"></asp:Label>
                                                <asp:Panel ID="SubstitutionPanel" runat="server" Visible='<%# Eval("IsSubstitution") %>'>
                                                    <asp:Panel ID="PlayerSubPanel" runat="server" Visible='<%# Eval("PlayerOut").ToString() != "0" %>' >
                                                        <asp:Image ID="PlayerOutImage" runat="server" ImageUrl="~/Images/Icons/PlayerOut.png"
                                                         ToolTip="<%$  Resources:Resource, Global_PlayerOut %>" Visible='<%# Eval("PlayerIn").ToString() != "0" %>' />
                                                        <asp:HyperLink ID="PlayerOutHyperlink" runat="server" SkinID="BlueInfoHyperLink"
                                                         Text='<%# Eval("PlayerOutName") %>' NavigateUrl='<%# "~/Player.aspx?Id=" + Eval("PlayerOut") %>'></asp:HyperLink>  
                                                         <asp:Panel ID="PlayerInPanel" runat="server" Visible='<%# Eval("PlayerIn").ToString() != "0" %>'  >
                                                            <asp:Image ID="PlayerInImage" runat="server" ImageUrl="~/Images/Icons/PlayerIn.png"
                                                             ToolTip="<%$  Resources:Resource, Global_PlayerIn %>" />
                                                            <asp:HyperLink ID="PlayerIlinkn" runat="server" SkinID="BlueInfoHyperLink"
                                                             Text='<%# Eval("PlayerInName") %>' NavigateUrl='<%# "~/Player.aspx?Id=" + Eval("PlayerIn") %>'></asp:HyperLink> 
                                                         </asp:Panel>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerPositionPanel" runat="server" Visible='<%# Eval("newPosition").ToString().Length > 0 %>'>
                                                         <asp:Label ID="NewPlayerPositionLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Position + ": " + Eval("newPosition") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerInstructionPanel" runat="server" Visible='<%# Eval("newInstruction").ToString().Length > 0 %>'>
                                                        <asp:Label ID="NewInstructionLabel" runat="server" SkinID="InfoLabel"
                                                        Text='<%# Resources.Resource.Global_Instruction + ": " + Eval("newInstruction") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="PlayerPreferredActionPanel" runat="server" Visible='<%# Eval("newPreferredAction").ToString().Length > 0 %>'>
                                                        <asp:Label ID="NewPreferredActionLabel" runat="server"  SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.MatchInstructions_PreferredActionLabel + ": " + Eval("newPreferredAction") %>'></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="newAttitudePanel" runat="server" Visible='<%# Eval("newAttitude").ToString().Length > 0 %>'>
                                                        <asp:Label ID="newAttitudeLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Attitude + ": " + Eval("newAttitude") %>' ></asp:Label>
                                                     </asp:Panel>
                                                     <asp:Panel ID="newAggressivenessPanel" runat="server" Visible='<%# Eval("newAggressiveness").ToString().Length > 0 %>'>
                                                        <asp:Label ID="newAggressivenessLabel" runat="server" SkinID="InfoLabel"
                                                         Text='<%# Resources.Resource.Global_Aggressiveness + ": " + Eval("newAggressiveness") %>' ></asp:Label>
                                                     </asp:Panel>
                                                </asp:Panel>
                                            
                                                <%--<asp:HyperLink ID="PlayerNameHyperLink" runat="server" Text='<%# Eval("PlayerName") %>'
                                                    NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:HyperLink>--%>
                                            </ItemTemplate>
                                            <ItemStyle BorderWidth="0" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:ListView>
                    
            <asp:SqlDataSource ID="ScoreBordSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="Nivdal_GetMatchScoreBoard" SelectCommandType="StoredProcedure">
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="HomeTeamGoalsAndWarningsForScoreboardSqlDataSource" runat="server"
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="Nivdal_GetHomeScoreboardEventsForMatch"
                SelectCommandType="StoredProcedure"></asp:SqlDataSource>
            <asp:SqlDataSource ID="AwayTeamGoalsAndWarningsForScoreboardSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="Nivdal_GetAwayScoreboardEventsForMatch" SelectCommandType="StoredProcedure">
            </asp:SqlDataSource>
            <asp:Hyperlink ID="MatchRatingButton" runat="server" Text="<%$ Resources:Resource, MatchPage_MatchRatingButton %>" Visible="false" SkinID="GreenTitleHyperLink"></asp:Hyperlink>
            <br />
            <br />
             <asp:Label ID="ShowingSummaryLabel" runat="server" Text="<%$ Resources:Resource, MatchPage_ShowingSummaryLabel %>" SkinID="InfoLabel"></asp:Label>
            <br />
              
            <%--<asp:GridView ID="MatchEventsGridView" runat="server" AutoGenerateColumns="False"
                ShowHeader="False" DataSourceID="MatchEventsSqlDataSource" SkinID="Match">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="EventTimeLabel" runat="server" Text='<%# Eval("EventTime")%>' SkinID="InfoLabel"> </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Label ID="EventTextLabel" runat="server" Text='<%# Eval("EventText")%>' SkinID="InfoLabel"> </asp:Label>
                            
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("IconName", "~/Images/MatchIcons/{0}") %>' CssClass="JustPaddingStyle"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

            
            <asp:SqlDataSource ID="MatchEventsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="Nivdal_GetMatchEvents" SelectCommandType="StoredProcedure"></asp:SqlDataSource>--%>
            <asp:Repeater ID="NewMatchEventsRepeater" runat="server" DataSourceID="MatchEventsSqlDataSource">
            <ItemTemplate>
                <asp:Panel ID="EventTextPanel" runat="server">
                    <table cellpadding="3">
                    <tr>
                    <td style="vertical-align:top;">
                        <asp:Label ID="TimeLabel" runat="server" Text='<%# Eval("EventTime") %>' SkinID="GridLabel"></asp:Label>
                    </td>
                    <td style="vertical-align:top;">
                        <asp:Image ID="EventImage" runat="server" Width="16" Height="16" ImageUrl='<%# "~/Images/MatchIcons/" + Eval("IconName") %>' />
                    </td>
                    <td style="vertical-align:top;">
                        <asp:Label ID="ScoreLabel" runat="server" Text='<%# Eval("Score") + " " %>' SkinID="GridLabel" Visible='<%# Eval("IsGoal") %>'></asp:Label>
                        <asp:Label ID="EventTextLabel" runat="server" Text='<%# Eval("EventText") %>' SkinID="GridLabel"></asp:Label>
                        <cc2:AnimationExtender ID="NewEventAnimation" runat="server" TargetControlID="EventTextPanel" Enabled='<%# Eval("IsNew") %>' >
                            <Animations>
                                <OnLoad>
                                    <Sequence>
                                         <Color PropertyKey="backgroundColor" StartValue="#FFFFFF" EndValue="#AFED53" Duration="0.3" />  
                                    </Sequence>
                                </OnLoad>
                            </Animations>
                        </cc2:AnimationExtender>
                    </td>
                    </tr>
                    </table>
                </asp:Panel>
            </ItemTemplate>
            <%--<SeparatorTemplate><br /></SeparatorTemplate>--%>
            </asp:Repeater>
            
            <asp:SqlDataSource ID="MatchEventsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="Nivdal_GetNewMatchEvents" SelectCommandType="StoredProcedure"></asp:SqlDataSource>

            <br />
            <asp:Panel ID="StadiumAssignmentPanel" runat="server">                
                
                <asp:DropDownList ID="StadiumsDropDownList" CssClass="rounded_corners"
                    AppendDataBoundItems="true" DataSourceID="ShowStadiumsValuesSqlDataSource" DataTextField="StadiumName"
                    DataValueField="StadiumId" runat="server">
                </asp:DropDownList>
                &nbsp;&nbsp;
                <asp:Image ID="StadiumCostsImage" runat="server" ImageUrl="~/Images/question.gif" />
                <asp:ImageButton ID="AssignStadiumLinkButton" runat="server" ImageUrl="~/Images/Icons/vi.png" ToolTip="Assign stadium"
                 Message="<%$ Resources:Resource, MatchPage_StadiumAssignConfirmQuestion %>"
                 OnClientClick="return confirm(this.getAttribute('Message'))"
                  ValidationGroup="AddNewSpnsor" OnClick="AssignStadiumButton_Click" />
                <cc1:Flyout ID="StadiumCostsFlyout" runat="server" AttachTo="StadiumCostsImage" NoneEffect="true" Position="TOP_CENTER">
                    <div class="ToolTipStyle" style="width:300px;">
                        <asp:Label ID="StadiumCostsTitleLabel" runat="server" SkinID="InfoLabel"
                         Text="<%$ Resources:Resource, ListOfTeamMatches_StadiumCostsTitleLabelText %>"></asp:Label>
                         <br />
                        <asp:GridView ID="StadiumsCostGridView" runat="server" DataSourceID="StadiumsCostSQLDataSourse"
                         SkinID="Professional" AllowPaging="false" AutoGenerateColumns="false">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                       <asp:Label ID="StadiumNameLabel" runat="server" Text='<%# Eval("Name") %>' SkinID="InfoLabel"></asp:Label> 
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Label ID="StadiumCostLabel" runat="server" Text='<%# Eval("Cost") %>'></asp:Label>
                                        <asp:Image ID="AtukImage" runat="server" ImageUrl="~/Images/Icons/atuk.png"
                                         ToolTip="<%$ Resources:Resource, Atuks %>"/>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </div>                        
                </cc1:Flyout>       
                <asp:SqlDataSource ID="ShowStadiumsValuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="Nivdal_GetStadiumsDDLForMatch" SelectCommandType="StoredProcedure" >
                </asp:SqlDataSource>
                     <asp:SqlDataSource ID="StadiumsCostSQLDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                        SelectCommand="Nivdal_GetStadumCostsForMatch" SelectCommandType="StoredProcedure">
                    </asp:SqlDataSource>
             </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>   
    </div>  
</asp:Content>
